#ifndef __COMANY_H_
#define __COMANY_H_

#include "includes.h"
#include <string.h>
/*
 * 命令行解析文件
 * */

rt_err_t uart_init(void);
void com_any_thread(void *parm);    //中断分析线程
rt_err_t uart_input_notice(rt_device_t dev, rt_size_t size);
void serial_thread_entry(void *parameter);
void command_anys_thread(void *parameter);
void wave_send_thread(void *parameter);



int8_t setv(char *name,char * value);     //设置变量名


typedef struct
{
    float v_x;
    float v_y;
    float v_z;
    int m_n;
    float kp;
    float kd;
    float ki;
    float target_encoder;
    volatile uint8_t startup_send_wave;

}sendPackage_t;

typedef struct
{
    rt_int32_t encoder_data[4];
    int16_t groy_x;
    int16_t groy_y;
    int16_t groy_z;

    int16_t acc_x;
    int16_t acc_y;
    int16_t acc_z;

    int16_t pitch;
    int16_t yaw;
    int16_t roll;


}sendWave_t;        /*发送波形数据结构体定义*/

extern rt_mailbox_t package_mailbox;
extern rt_mailbox_t wave_data_mailbox;
extern sendWave_t wave_data;    /*不太懂这里为什么要extern这里*/



#endif
